package com.leng.user.controller;


import com.leng.user.feign.AccountFeign;
import com.leng.user.service.UserService;
import com.leng.common.entity.User;
import com.leng.common.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 *@作者: 冷俊杰
 *@类名: UserController类
 *@创建时间: 2022/9/28 15:42
 *@描述:
 *
 *
 *@修改原图
 *@修改作者
 *@修改时间
 */
@RestController
public class UserController {
    @Autowired
    private UserService service;

    @Resource
    private AccountFeign accountFeign;

    @GetMapping("/getUserList")
    public Result getUserList(){
        List<User> list = service.list();
        return Result.ok().data("users",list);
    }
    @GetMapping("/getAccountList")
    public Result getAccountList(){
        Result result = accountFeign.getAccountList();
        return result;
    }
}
